use kalosm::vision::*;

#[tokio::main]
async fn main()  {
    println!("Hello, world!");
    //创建可以转录单行文本的OCR模型
    let mut model = Ocr::builder().build().await.unwrap();
    let path = "C:/Users/yuzhanfeng/Desktop/1b5ac5d276a09b5bdc56a74bcfce966.png";
    let image = image::open(path).unwrap();
    let text = model
        .recognize_text(
            OcrInferenceSettings::new(image)
                .unwrap(),
        )
        .unwrap();
    println!("{}", text);
}
